package com.xhu.collegestudentrentalsystem.module.user.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;

/**
 * @author zhu huilin
 * @date 2023/3/8 15:00
 *  转向错误页面的控制器
 */
@Controller
public class ErrorConroller {

    /**
     * 页面没找到404
     */
    @RequestMapping("/404")
    public String turn404Page(){
        return "forward:error/404";
    }

    /**
     * 没有权限访问403
     */
    @RequestMapping("/403")
    public String turn403Page(){
        return "forward:error/403";
    }

    /**
     * 服务器出错500
     */
    public String turn500Page(){
        return "forward:error/500";
    }

}
